#if !defined TEACHER_H
#define TEACHER_H

#include "User.h"
#include <string>

class Teacher:public User{
public:
	Teacher(string loginName="", string loginPassword="",string number="XXXXXX",string name="XXX",string sex="",int age=0,string dept="δָ",
		string profession="δָ",string starttime="δָ",int borrowtime=30,int borrowcount=5,int borrowingcount=0, string telephone="00000000000");
    virtual ~Teacher();
    string getNum();
    void setNum(string number);
    string getName();
    void setName(string name);
    string getSex();
    void setSex(string sex);
    int getAge();
    void setAge(int age);
    string getDept();
    void setDept(string dept);
    string getProfession();
    void setProfession(string profession);
    string getStartTime();
    void setStartTime(string starttime);
    int getBorrowTime();
    void setBorrowTime(int borrowtime);
    int getBorrowCount();
    void setBorrowCount(int borrowcount);
	int getBorrowingCount();
    void setBorrowingCount(int borrowingcount);
	string getTelephone();
    void setTelephone(string telephone);
    void TeacherShow();

	void readFromFile(fstream &);
	void writeToFile(fstream &) const;
	friend istream& operator>>(istream &istrm, Teacher &teacher);
	friend ostream& operator<<(ostream &ostrm,const Teacher &teacher);

private:
    string teaNum;
    string teaName;
    string teaSex;
    int teaAge;
	string teaDept;
	string teaProfession;
	string teaStartTime;
    int teaBorrowTime;
	int teaBorrowCount;
	int teaBorrowingCount;
	string teaTelephone;
};
#endif
